package com.yequan;

import com.yequan.work.DateUtil;

import java.text.ParseException;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;

/**
 * @author yequan
 * @date 2021/05/24 15:32
 **/
public class LocalDateDemo {

    public static void main(String[] args) throws Exception {
//        LocalDate localDate = Instant.ofEpochMilli(Long.parseLong(String.valueOf(DateUtil.String2Date3("2021-05-23 23:59:59").getTime()))).atZone(ZoneId.systemDefault()).toLocalDate();
        LocalDate localDate = Instant.ofEpochMilli(1621905727000L).atZone(ZoneId.systemDefault()).toLocalDate();
        if (localDate.equals(LocalDate.now())) {
            System.out.println("true");
        } else {
            System.out.println("false");
        }
    }

}
